import { dateFormat } from '@/util/date';
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  addBtn: false,
  editBtn: true,
  delBtn: false,
  viewBtn: true,
  selection: true,
  height: 450,
  column: [{
    type: 'input',
    label: '唯一标识',
    prop: 'id',
    hide: true,
    display: false
  }, {
    type: 'input',
    label: '线路编码',
    prop: 'lineCode',
    hide: true,
    display: false
  }, {
    type: 'input',
    label: '车站编码',
    prop: 'stationCode',
    hide: true,
    display: false
  }, {
    type: 'input',
    label: '配入数量',
    prop: 'deliveryCount',
    display: false
  }, {
    type: 'select',
    label: '配入人',
    prop: 'deliveryPersonName',
    search: true,
    display: false,
    component: 'user-select',
    params: {
      userCodeKey: 'handPersonCode',
      belongToStation: true
    },
  }, {
    type: 'input',
    label: '配入人工号',
    prop: 'deliveryPersonCode',
    display: false,
    width: 90
  }, {
    "type": "select",
    "label": "配入人2",
    "prop": "deliveryPersonTwoName",
    display: false,
    component: "user-select",
    params: {
      userCodeKey: "deliveryPersonTwoCode",
      belongToStation: true
    }
  }, {
    "type": "input",
    "label": "配入人2工号",
    "prop": "deliveryPersonTwoCode",
    display: false,
    width: 100
  },{
    type: 'date',
    label: '配入时间',
    prop: 'deliveryTime',
    search: true,
    searchValue: [startDate, endDate],
    searchRange: true,
    searchSpan: 12,
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    display: false,
    width: 90
  }, {
    type: 'select',
    label: '接收人',
    prop: 'receivePersonName',
    search: true,
    display: false,
    component: 'user-select',
    params: {
      userCodeKey: 'handPersonCode',
      belongToStation: true
    }
  }, {
    type: 'input',
    label: '接收人工号',
    prop: 'receivePersonCode',
    display: false,
    width: 90
  }, {
    type: 'date',
    label: '接收时间',
    prop: 'receiveTime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd HH:mm:ss',
    display: false,
    width: 90
  }, 
  // {
  //   type: 'input',
  //   label: '配入状态',
  //   prop: 'deliveryStatus',
  //   hide: true,
  //   display: false,
  // }, 
  {
    type: 'input',
    label: '实际合计接收数量',
    prop: 'receiveCount',
    display: false,
    width: 120
  }, {
    type: 'input',
    label: '合计差异数量',
    prop: 'differenceCount',
    display: false,
    width: 100
  }, {
    "type": "select",
    "label": "状态",
    "prop": "deliveryStatus",
    display: false,
    dicData: [{
      label: '待确认',
      value: '0'
    }, {
      label: '已确认',
      value: '1'
    }, {
      label: '差异反馈',
      value: '2'
    }, {
      label: '差异申诉',
      value: '3'
    }],
  }, {
    type: 'input',
    label: '备注',
    prop: 'remark',
    display: false,
    width: 150
  }, {
    type: 'input',
    label: '部门ID',
    prop: 'deptId',
    hide: true,
    display: false
  }, {
    type: 'input',
    label: '创建人ID',
    prop: 'creatorId',
    hide: true,
    display: false
  }, {
    type: 'input',
    label: '创建人名称',
    prop: 'creatorName',
    hide: true,
    display: false
  }, {
    type: 'input',
    label: '创建时间',
    prop: 'createTime',
    hide: true,
    display: false
  }],
  group: [{
    label: '配入摘要',
    column: [{
      type: 'input',
      label: '配入人',
      prop: 'deliveryPersonName',
      editDisabled: true
    }, {
      type: 'input',
      label: '配入人工号',
      prop: 'deliveryPersonCode',
      editDisabled: true
    }, {
      type: 'date',
      label: '配入时间',
      prop: 'deliveryTime',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      editDisabled: true
    }, {
      label: '',
      labelWidth: 0,
      prop: 'swTkTicketDeliveryDetails',
      formslot: true,
      span: 24
    }]
  }, {
    label: '接收信息',
    column: [{
      type: 'select',
      label: '接收人',
      prop: 'receivePersonName',
      editDisabled: false,
      component: 'user-select',
      params: {
        userCodeKey: 'receivePersonCode'
      },
      rules: [{
        required: true,
        message: '请选择接收人'
      }],
      editDisabled: true
    }, {
      type: 'input',
      label: '接收人工号',
      prop: 'receivePersonCode',
      disabled: true
    }, {
      type: 'date',
      label: '接收时间',
      prop: 'receiveTime',
      editDisabled: false,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        message: '请选择接收时间'
      }]
    }, {
      type: 'textarea',
      label: '备注',
      prop: 'remark',
      span: 24,
      editDisplay: false
    }]
  }, {
    label: '反馈信息',
    column: [{
      label: '反馈信息',
      prop: 'feedback',
      type: 'textarea',
      editDisabled: false,
      span: 24
    }, {
      label: '调查结果',
      prop: 'lineSurveyResult',
      type: 'textarea',
      editDisabled: true,
      span: 24
    }]
  }, {
    label: '申诉信息',
    column: [{
      label: '申诉信息',
      prop: 'complain',
      type: 'textarea',
      editDisabled: true,
      span: 24
    }, {
      label: '调查结果',
      prop: 'stationSurveyResult',
      type: 'textarea',
      editDisabled: false,
      span: 24
    }]
  }]
}
